package org.dromara.genealogy.domain.bo;

import org.dromara.genealogy.domain.GeDirectory;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

/**
 * 目录管理业务对象 ge_directory
 *
 * @author qianjm
 * @date 2025-08-18
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = GeDirectory.class, reverseConvertGenerate = false)
public class GeDirectoryBo extends BaseEntity {

    /**
     *
     */
    private Long id;

    /**
     * 目录code
     */
    @NotBlank(message = "目录code不能为空", groups = { AddGroup.class, EditGroup.class })
    private String code;

    /**
     * 目录名称
     */
    @NotBlank(message = "目录名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String name;


    @NotNull(message = "族谱id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long geId;


    /**
     * 排序值
     */
    @NotNull(message = "排序值不能为空", groups = { AddGroup.class, EditGroup.class })
    private int sorted;

    private Long parentId;

}
